/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 * No deletion without permission, or be held responsible to law.
 * @author XPF
 */
import { defHttp } from '/@/utils/http/axios';
import { useGlobSetting } from '/@/hooks/setting';
import { BasicModel, Page } from '../model/baseModel';

const { adminPath } = useGlobSetting();

export interface SportsTemplateConfig extends BasicModel<SportsTemplateConfig> {
  configId?: string; // 模板主键
  adaptGrade?: string; // 适配年级
  isDelete?: string; // 删除标记
}

export const sportsTemplateConfigList = (params?: SportsTemplateConfig | any) =>
  defHttp.get<SportsTemplateConfig>({ url: adminPath + '/sports/sportsTemplateConfig/list', params });

export const sportsTemplateConfigListData = (params?: SportsTemplateConfig | any) =>
  defHttp.post<Page<SportsTemplateConfig>>({ url: adminPath + '/sports/sportsTemplateConfig/listData', params });

export const sportsTemplateConfigForm = (params?: SportsTemplateConfig | any) =>
  defHttp.get<SportsTemplateConfig>({ url: adminPath + '/sports/sportsTemplateConfig/form', params });

export const sportsTemplateConfigSave = (params?: any, data?: SportsTemplateConfig | any) =>
  defHttp.postJson<SportsTemplateConfig>({ url: adminPath + '/sports/sportsTemplateConfig/save', params, data });

export const sportsTemplateConfigDelete = (params?: SportsTemplateConfig | any) =>
  defHttp.get<SportsTemplateConfig>({ url: adminPath + '/sports/sportsTemplateConfig/delete', params });

export const sportsTemplateConfigStatus = (params?: any, data?: SportsTemplateConfig | any) =>
  defHttp.post<SportsTemplateConfig>({
    url: adminPath + '/sports/sportsTemplateConfig/status',
    params,
    data,
  });
